import * as serviceApi from '../services/box';

export default {
  namespace: 'box',

  state: {},

  effects: {
    // //查询一个分单的所有货柜列表
    // *getByHBLId({ payload, callback }, { call, put }) {
    //   const res = yield call(serviceApi.getByHBLId, payload)
    //   if (callback)
    //     callback(res);
    // },
    //查询一个主单及其分单的所有货柜列表，并带分单信息
    *getByBillId({ payload, callback }, { call, put }) {
      const res = yield call(serviceApi.getByBillId, payload)
      if (callback)
        callback(res);
    },
    *remove({ payload, callback }, { call, put }) {
      const res = yield call(serviceApi.remove, payload);
      if (callback)
        callback(res);
    },
    *update({ payload, callback }, { call, put }) {
      const res = yield call(serviceApi.update, payload);
      if (callback)
        callback(res);
    },

    

  },
  reducers: {},
};
